<?php
	$protectid="11"; 
	include("../protect.php");
	
	include_once("../../config.inc.php");
	
	$strID = $_GET['OrderId'];
	$strCode = $_GET['code'];
	include_once(CFG_LIB_DIR."manage_page.php");	
	$objManPage = new clsManagePage();
	
	//分页获取数据
	$strSqlWhere = " and L.`OrderCode` = '$strCode'";
	$ProResult = $objManPage->GetResult('L.`OrderListID`, L.`OrderCode`, L.`ProductsID`, L.`ProductName`, L.`Price`, L.`Number`, L.`Count`, c.`CateName`', '`'.con_strPREFIX.'order_list` as L LEFT JOIN `'.con_strPREFIX.'sys_procategory` as c ON L.`CateID` = c.`SysProCategoryID`', $strSqlWhere);

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>查看</title>
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<link href="../css/edit.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/commentJS.js"></script>
</head>

<body id="main" >
<table summary="" id="pagehead" cellpadding="0" cellspacing="0" border="0" width="100%">
	<tr>
		<td><h1>查看详细</h1></td>
		<td class="actions">
			<table summary="" cellpadding="0" cellspacing="0" border="0" align="right">
				<tr>
          <td class="active"><a href="#" >查看详细</a></td>
					<td ><a href="#" onclick="return ConfirmCloseWinow('');">关闭</a></td>
				</tr>
			</table>
		</td>
	</tr>
</table>

<?php
	include_once(CFG_LIB_DIR."preview.php");
	$objPreview = new clsPreview();
	
	$p_arrColumn = array(
												array("ID", "OrderID"),
												array("订单号", "OrderCode"),
												array("会员名称", "MemberID", "Type" => "SQL", "secTable" => con_strPREFIX."member", "secColumn" => "MemberName", "secIDColumn" => "MemberID"),
												array("收货人", "MemberName"),
												array("联系电话", "MemberPhone"),
												array("送货地址", "MemberAddr"),
												array("总金额", "Total"),
												array("配送方式", "Mode"),
												array("运费", "PayMode"),
												array("是否付款", "IsPay", "Type" => "Boolean"),
												array("订购日期", "PutTime", "Type" => "Date")
								 );
	
	$objPreview->vodPrintPreview(con_strPREFIX."order", $p_arrColumn, "OrderID", $strID);
	//产品列表
	include_once(CFG_LIB_DIR.'manage.php');
	$objMan = new clsManage();
	
	$arrColumnTips = array(
										array("tips" => "ID", "width" => "5%"),
										array("tips" => "订单号", "width" => "15%"),
										array("tips" => "品名", "width" => "10%"),
										array("tips" => "类别", "width" => "20%"),
										array("tips" => "单价", "width" => "15%"),
										array("tips" => "数量", "width" => "15%"),
										array("tips" => "小计", "width" => "10%")
									 );
									 						 
	$arrColumn = array(
										array("Text" => "OrderListID"),
										array("Text" => "OrderCode"),
										array("Text" => "ProductName"),
										array("Text" => "CateName"),
										array("Text" => "Price"),
										array("Text" => "Number"),
										array("Text" => "Count")
									 );
	
	echo $objMan->strHead($arrColumnTips);
	echo $objMan->strMiddle($ProResult, $arrColumn);
	echo $objMan->strLast();
	
	
?>
<div class="buttons">
	<input type="button" value="关闭" class="submit" onclick="return ConfirmCloseWinow('');">
</div>

<br>
<?php include "../bottom.php"; ?>
</div>
</body>
</html>


